<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var xing = +prompt("请输入日期")
        if (xing % 7 == 0) {
            alert("今天星期日")
        } else if (xing % 7 == 1) {
            alert("今天星期一")
        } else if (xing % 7 == 2) {
            alert("今天星期二")
        } else if (xing % 7 == 3) {
            alert("今天星期三")
        } else if (xing % 7 == 4) {
            alert("今天星期四")
        } else if (xing % 7 == 5) {
            alert("今天星期五")
        } else if (xing % 7 == 6) {
            alert("今天星期六")
        } else if (xing % 7 == 7) {
            alert("今天星期天")
        }
    </script>
</head>

<body>

</body>

</html>